﻿// MT307




using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.Collections.Generic;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category3
{
  public class MT307 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagSequenceDefinition U0002;
    private static SwiftTagDefinition U0003;
    private static SwiftTagSubItemDefinition U0004;
    private static SwiftTagDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagChoiceDefinition U0011;
    private static SwiftTagDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagDefinition U0015;
    private static SwiftTagSubItemDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagSequenceDefinition U0019;
    private static SwiftTagDefinition U001A;
    private static SwiftTagSubItemDefinition U001B;
    private static SwiftTagChoiceDefinition U001C;
    private static SwiftTagDefinition U001D;
    private static SwiftTagSubItemDefinition U001E;
    private static SwiftTagSubItemDefinition U001F;
    private static SwiftTagDefinition U007F;
    private static SwiftTagSubItemDefinition U0080;
    private static SwiftTagSubItemDefinition U0081;
    private static SwiftTagSubItemDefinition U0082;
    private static SwiftTagDefinition U0083;
    private static SwiftTagSubItemDefinition U0084;
    private static SwiftTagSubItemDefinition U0086;
    private static SwiftTagDefinition U0087;
    private static SwiftTagSubItemDefinition U0088;
    private static SwiftTagDefinition U0089;
    private static SwiftTagSubItemDefinition U008A;
    private static SwiftTagSequenceDefinition U008B;
    private static SwiftTagDefinition U008C;
    private static SwiftTagSubItemDefinition U008D;
    private static SwiftTagDefinition U008E;
    private static SwiftTagSubItemDefinition U008F;
    private static SwiftTagSubItemDefinition U0090;
    private static SwiftTagDefinition U0091;
    private static SwiftTagSubItemDefinition U0092;
    private static SwiftTagSubItemDefinition U0093;
    private static SwiftTagSubItemDefinition U0094;
    private static SwiftTagSubItemDefinition U0095;
    private static SwiftTagSubItemDefinition U0096;
    private static SwiftTagSequenceDefinition U0097;
    private static SwiftTagDefinition U0098;
    private static SwiftTagSubItemDefinition U0099;
    private static SwiftTagChoiceDefinition U009A;
    private static SwiftTagDefinition U009B;
    private static SwiftTagSubItemDefinition U009C;
    private static SwiftTagSubItemDefinition U009D;
    private static SwiftTagDefinition U009E;
    private static SwiftTagSubItemDefinition U009F;
    private static SwiftTagSubItemDefinition U0001U0002;
    private static SwiftTagSubItemDefinition U0002U0002;
    private static SwiftTagDefinition U0003U0002;
    private static SwiftTagSubItemDefinition U0004U0002;
    private static SwiftTagSubItemDefinition U0005U0002;
    private static SwiftTagDefinition U0006U0002;
    private static SwiftTagSubItemDefinition U0007U0002;
    private static SwiftTagSequenceDefinition U0008U0002;
    private static SwiftTagDefinition U000EU0002;
    private static SwiftTagSubItemDefinition U000FU0002;
    private static SwiftTagChoiceDefinition U0010U0002;
    private static SwiftTagDefinition U0011U0002;
    private static SwiftTagSubItemDefinition U0012U0002;
    private static SwiftTagSubItemDefinition U0013U0002;
    private static SwiftTagDefinition U0014U0002;
    private static SwiftTagSubItemDefinition U0015U0002;
    private static SwiftTagSubItemDefinition U0016U0002;
    private static SwiftTagSubItemDefinition U0017U0002;
    private static SwiftTagDefinition U0018U0002;
    private static SwiftTagSubItemDefinition U0019U0002;
    private static SwiftTagSubItemDefinition U001AU0002;
    private static SwiftTagDefinition U001BU0002;
    private static SwiftTagSubItemDefinition U001CU0002;
    private static SwiftTagSubItemDefinition U001DU0002;
    private static SwiftTagDefinition U001EU0002;
    private static SwiftTagSubItemDefinition U001FU0002;
    private static SwiftTagSequenceDefinition U007FU0002;
    private static SwiftTagDefinition U0080U0002;
    private static SwiftTagSubItemDefinition U0081U0002;
    private static SwiftTagDefinition U0082U0002;
    private static SwiftTagSubItemDefinition U0083U0002;
    private static SwiftTagSubItemDefinition U0084U0002;
    private static SwiftTagSubItemDefinition U0086U0002;
    private static SwiftTagSubItemDefinition U0087U0002;
    private static SwiftTagSequenceDefinition U0088U0002;
    private static SwiftTagDefinition U0089U0002;
    private static SwiftTagSubItemDefinition U008AU0002;
    private static SwiftTagChoiceDefinition U008BU0002;
    private static SwiftTagDefinition U008CU0002;
    private static SwiftTagSubItemDefinition U008DU0002;
    private static SwiftTagSubItemDefinition U008EU0002;
    private static SwiftTagDefinition U008FU0002;
    private static SwiftTagSubItemDefinition U0090U0002;
    private static SwiftTagSubItemDefinition U0091U0002;
    private static SwiftTagSubItemDefinition U0092U0002;
    private static SwiftTagDefinition U0093U0002;
    private static SwiftTagSubItemDefinition U0094U0002;
    private static SwiftTagSubItemDefinition U0095U0002;
    private static SwiftTagDefinition U0096U0002;
    private static SwiftTagSubItemDefinition U0097U0002;
    private static SwiftTagSubItemDefinition U0098U0002;
    private static SwiftTagDefinition U0099U0002;
    private static SwiftTagSubItemDefinition U009AU0002;
    private static SwiftTagSubItemDefinition U009BU0002;
    private static SwiftTagDefinition U009CU0002;
    private static SwiftTagSubItemDefinition U009DU0002;
    private static SwiftTagDefinition U009EU0002;
    private static SwiftTagSubItemDefinition U009FU0002;
    private static SwiftTagDefinition U0001U0003;
    private static SwiftTagSubItemDefinition U0002U0003;
    private static SwiftTagSequenceDefinition U0003U0003;
    private static SwiftTagDefinition U0004U0003;
    private static SwiftTagSubItemDefinition U0005U0003;
    private static SwiftTagSequenceDefinition U0006U0003;
    private static SwiftTagDefinition U0007U0003;
    private static SwiftTagSubItemDefinition U0008U0003;
    private static SwiftTagChoiceDefinition U000EU0003;
    private static SwiftTagDefinition U000FU0003;
    private static SwiftTagSubItemDefinition U0010U0003;
    private static SwiftTagSubItemDefinition U0011U0003;
    private static SwiftTagDefinition U0012U0003;
    private static SwiftTagSubItemDefinition U0013U0003;
    private static SwiftTagSubItemDefinition U0014U0003;
    private static SwiftTagSubItemDefinition U0015U0003;
    private static SwiftTagDefinition U0016U0003;
    private static SwiftTagSubItemDefinition U0017U0003;
    private static SwiftTagSubItemDefinition U0018U0003;
    private static SwiftTagDefinition U0019U0003;
    private static SwiftTagSubItemDefinition U001AU0003;
    private static SwiftTagDefinition U001BU0003;
    private static SwiftTagSubItemDefinition U001CU0003;
    private static SwiftTagSubItemDefinition U001DU0003;
    private static SwiftTagDefinition U001EU0003;
    private static SwiftTagSubItemDefinition U001FU0003;
    private static SwiftTagSubItemDefinition U007FU0003;
    private static SwiftTagSubItemDefinition U0080U0003;
    private static SwiftTagSubItemDefinition U0081U0003;
    private static SwiftTagDefinition U0082U0003;
    private static SwiftTagSubItemDefinition U0083U0003;
    private static SwiftTagSequenceDefinition U0084U0003;
    private static SwiftTagDefinition U0086U0003;
    private static SwiftTagSubItemDefinition U0087U0003;
    private static SwiftTagDefinition U0088U0003;
    private static SwiftTagSubItemDefinition U0089U0003;
    private static SwiftTagSubItemDefinition U008AU0003;
    private static SwiftTagDefinition U008BU0003;
    private static SwiftTagSubItemDefinition U008CU0003;
    private static SwiftTagSubItemDefinition U008DU0003;
    private static SwiftTagSubItemDefinition U008EU0003;
    private static SwiftTagSubItemDefinition U008FU0003;
    private static SwiftTagSequenceDefinition U0090U0003;
    private static SwiftTagDefinition U0091U0003;
    private static SwiftTagSubItemDefinition U0092U0003;
    private static SwiftTagChoiceDefinition U0093U0003;
    private static SwiftTagDefinition U0094U0003;
    private static SwiftTagSubItemDefinition U0095U0003;
    private static SwiftTagSubItemDefinition U0096U0003;
    private static SwiftTagDefinition U0097U0003;
    private static SwiftTagSubItemDefinition U0098U0003;
    private static SwiftTagSubItemDefinition U0099U0003;
    private static SwiftTagSubItemDefinition U009AU0003;
    private static SwiftTagDefinition U009BU0003;
    private static SwiftTagSubItemDefinition U009CU0003;
    private static SwiftTagSubItemDefinition U009DU0003;
    private static SwiftTagDefinition U009EU0003;
    private static SwiftTagSubItemDefinition U009FU0003;
    private static SwiftTagSubItemDefinition U0001U0004;
    private static SwiftTagDefinition U0002U0004;
    private static SwiftTagSubItemDefinition U0003U0004;
    private static SwiftTagSubItemDefinition U0004U0004;
    private static SwiftTagDefinition U0005U0004;
    private static SwiftTagSubItemDefinition U0006U0004;
    private static SwiftTagDefinition U0007U0004;
    private static SwiftTagSubItemDefinition U0008U0004;

    [Description("General Information")]
    public MT307.SequenceAClass SequenceA
    {
      get
      {
        return new MT307.SequenceAClass((SwiftElement) this, 0, false);
      }
    }

    [Description("FX Details")]
    public MT307.SequenceBClass SequenceB
    {
      get
      {
        return new MT307.SequenceBClass((SwiftElement) this, 0, false);
      }
    }

    [Description("Accounting Information")]
    public MT307.SequenceCClass SequenceC
    {
      get
      {
        MT307.SequenceCClass sequenceCclass = new MT307.SequenceCClass((SwiftElement) this, 0, false);
        if (this.ListTags((SwiftElement) sequenceCclass).Count > 0)
          return sequenceCclass;
        else
          return (MT307.SequenceCClass) null;
      }
    }

    [Description("Net Amount to be Settled")]
    public MT307.SequenceDClass SequenceD
    {
      get
      {
        MT307.SequenceDClass sequenceDclass = new MT307.SequenceDClass((SwiftElement) this, 0, false);
        if (this.ListTags((SwiftElement) sequenceDclass).Count > 0)
          return sequenceDclass;
        else
          return (MT307.SequenceDClass) null;
      }
    }

    public MT307()
      : base(true)
    {
    }

    public MT307(SwiftMessage message)
      : base(message)
    {
    }

    public MT307.SequenceCClass AddSequenceC()
    {
      return this.SequenceC ?? new MT307.SequenceCClass((SwiftElement) this, 0, true);
    }

    public void RemoveSequenceC(MT307.SequenceCClass sequence)
    {
      foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
        this.RemoveTag(tag);
    }

    public MT307.SequenceDClass AddSequenceD()
    {
      return this.SequenceD ?? new MT307.SequenceDClass((SwiftElement) this, 0, true);
    }

    public void RemoveSequenceD(MT307.SequenceDClass sequence)
    {
      foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
        this.RemoveTag(tag);
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT307.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT307.MessageDefinition = new SwiftMessageDefinition("MT307", "Advice/Instruction of a Third Party FX Deal");
      MT307.U0002 = new SwiftTagSequenceDefinition("SequenceA", "General Information");
      MT307.U0003 = new SwiftTagDefinition("StartOfBlock_A_16R", "Start of Block");
      MT307.U0003.TagName = ":16R:GENL";
      MT307.U0004 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U0004.Mandatory = false;
      MT307.U0003.Elements.Add((SwiftDefinitionElement) MT307.U0004);
      MT307.U0002.Elements.Add((SwiftDefinitionElement) MT307.U0003);
      MT307.U0005 = new SwiftTagDefinition("Reference_A_20C", "Reference");
      MT307.U0005.TagName = ":20C::";
      MT307.U0005.Multiple = true;
      MT307.U0006 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0005.Elements.Add((SwiftDefinitionElement) MT307.U0006);
      MT307.U0007 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT307.U0005.Elements.Add((SwiftDefinitionElement) MT307.U0007);
      MT307.U0002.Elements.Add((SwiftDefinitionElement) MT307.U0005);
      MT307.U0008 = new SwiftTagDefinition("FunctionOfTheMessage_A_23G", "Function of the Message");
      MT307.U0008.TagName = ":23G:";
      MT307.U000E = new SwiftTagSubItemDefinition("Function", "Function");
      MT307.U0008.Elements.Add((SwiftDefinitionElement) MT307.U000E);
      MT307.U000F = new SwiftTagSubItemDefinition("Subfunction", "Subfunction");
      MT307.U000F.Mandatory = false;
      MT307.U0010 = new SwiftTagSubItemDefinition("Subfunction_1", "Subfunction");
      MT307.U000F.Elements.Add((SwiftDefinitionElement) MT307.U0010);
      MT307.U0008.Elements.Add((SwiftDefinitionElement) MT307.U000F);
      MT307.U0002.Elements.Add((SwiftDefinitionElement) MT307.U0008);
      MT307.U0011 = new SwiftTagChoiceDefinition("Choice", "");
      MT307.U0011.Multiple = true;
      MT307.U0012 = new SwiftTagDefinition("Indicator_A_22H", "Indicator");
      MT307.U0012.TagName = ":22H::";
      MT307.U0012.Multiple = true;
      MT307.U0013 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0012.Elements.Add((SwiftDefinitionElement) MT307.U0013);
      MT307.U0014 = new SwiftTagSubItemDefinition("Indicator", "Indicator");
      MT307.U0012.Elements.Add((SwiftDefinitionElement) MT307.U0014);
      MT307.U0011.Elements.Add((SwiftDefinitionElement) MT307.U0012);
      MT307.U0015 = new SwiftTagDefinition("Indicator_A_22F", "Indicator");
      MT307.U0015.TagName = ":22F::";
      MT307.U0015.Multiple = true;
      MT307.U0016 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0015.Elements.Add((SwiftDefinitionElement) MT307.U0016);
      MT307.U0017 = new SwiftTagSubItemDefinition("DataSource", "Data Source Scheme");
      MT307.U0015.Elements.Add((SwiftDefinitionElement) MT307.U0017);
      MT307.U0018 = new SwiftTagSubItemDefinition("Indicator", "Indicator");
      MT307.U0015.Elements.Add((SwiftDefinitionElement) MT307.U0018);
      MT307.U0011.Elements.Add((SwiftDefinitionElement) MT307.U0015);
      MT307.U0002.Elements.Add((SwiftDefinitionElement) MT307.U0011);
      MT307.U0019 = new SwiftTagSequenceDefinition("SequenceA1", "Linkages");
      MT307.U0019.Mandatory = false;
      MT307.U0019.Multiple = true;
      MT307.U001A = new SwiftTagDefinition("StartOfBlock_A1_16R", "Start of Block");
      MT307.U001A.TagName = ":16R:LINK";
      MT307.U001B = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U001B.Mandatory = false;
      MT307.U001A.Elements.Add((SwiftDefinitionElement) MT307.U001B);
      MT307.U0019.Elements.Add((SwiftDefinitionElement) MT307.U001A);
      MT307.U001C = new SwiftTagChoiceDefinition("Choice", "");
      MT307.U001C.Mandatory = false;
      MT307.U001C.Multiple = true;
      MT307.U001D = new SwiftTagDefinition("NumberIdentification_A1_13A", "Linked Transaction");
      MT307.U001D.TagName = ":13A::";
      MT307.U001E = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U001D.Elements.Add((SwiftDefinitionElement) MT307.U001E);
      MT307.U001F = new SwiftTagSubItemDefinition("NumberId", "Number Id");
      MT307.U001D.Elements.Add((SwiftDefinitionElement) MT307.U001F);
      MT307.U001C.Elements.Add((SwiftDefinitionElement) MT307.U001D);
      MT307.U007F = new SwiftTagDefinition("NumberIdentification_A1_13B", "Agreement Version Number");
      MT307.U007F.TagName = ":13B::";
      MT307.U0080 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U007F.Elements.Add((SwiftDefinitionElement) MT307.U0080);
      MT307.U0081 = new SwiftTagSubItemDefinition("DataSource", "Data Source");
      MT307.U007F.Elements.Add((SwiftDefinitionElement) MT307.U0081);
      MT307.U0082 = new SwiftTagSubItemDefinition("Number_13B", "");
      MT307.U007F.Elements.Add((SwiftDefinitionElement) MT307.U0082);
      MT307.U001C.Elements.Add((SwiftDefinitionElement) MT307.U007F);
      MT307.U0019.Elements.Add((SwiftDefinitionElement) MT307.U001C);
      MT307.U0083 = new SwiftTagDefinition("Reference_A1_20C", "Reference");
      MT307.U0083.TagName = ":20C::";
      MT307.U0084 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0083.Elements.Add((SwiftDefinitionElement) MT307.U0084);
      MT307.U0086 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT307.U0083.Elements.Add((SwiftDefinitionElement) MT307.U0086);
      MT307.U0019.Elements.Add((SwiftDefinitionElement) MT307.U0083);
      MT307.U0087 = new SwiftTagDefinition("EndOfBlock_A1_16S", "End of Block");
      MT307.U0087.TagName = ":16S:LINK";
      MT307.U0088 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U0088.Mandatory = false;
      MT307.U0087.Elements.Add((SwiftDefinitionElement) MT307.U0088);
      MT307.U0019.Elements.Add((SwiftDefinitionElement) MT307.U0087);
      MT307.U0002.Elements.Add((SwiftDefinitionElement) MT307.U0019);
      MT307.U0089 = new SwiftTagDefinition("EndOfBlock_A_16S", "End of Block");
      MT307.U0089.TagName = ":16S:GENL";
      MT307.U008A = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U008A.Mandatory = false;
      MT307.U0089.Elements.Add((SwiftDefinitionElement) MT307.U008A);
      MT307.U0002.Elements.Add((SwiftDefinitionElement) MT307.U0089);
      MT307.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT307.U0002);
      MT307.U008B = new SwiftTagSequenceDefinition("SequenceB", "FX Details");
      MT307.U008C = new SwiftTagDefinition("StartOfBlock_B_16R", "Start of Block");
      MT307.U008C.TagName = ":16R:FXDET";
      MT307.U008D = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U008D.Mandatory = false;
      MT307.U008C.Elements.Add((SwiftDefinitionElement) MT307.U008D);
      MT307.U008B.Elements.Add((SwiftDefinitionElement) MT307.U008C);
      MT307.U008E = new SwiftTagDefinition("Date_B_98A", "Date");
      MT307.U008E.TagName = ":98A::";
      MT307.U008E.Multiple = true;
      MT307.U008F = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U008E.Elements.Add((SwiftDefinitionElement) MT307.U008F);
      MT307.U0090 = new SwiftTagSubItemDefinition("Date", "Date");
      MT307.U008E.Elements.Add((SwiftDefinitionElement) MT307.U0090);
      MT307.U008B.Elements.Add((SwiftDefinitionElement) MT307.U008E);
      MT307.U0091 = new SwiftTagDefinition("Rate_B_92B", "Exchange Rate");
      MT307.U0091.TagName = ":92B::";
      MT307.U0092 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0091.Elements.Add((SwiftDefinitionElement) MT307.U0092);
      MT307.U0093 = new SwiftTagSubItemDefinition("Rate", "Rate");
      MT307.U0094 = new SwiftTagSubItemDefinition("FirstCurrencyCode", "First Currency Code");
      MT307.U0093.Elements.Add((SwiftDefinitionElement) MT307.U0094);
      MT307.U0095 = new SwiftTagSubItemDefinition("SecondCurrencyCode", "Second Currency Code");
      MT307.U0093.Elements.Add((SwiftDefinitionElement) MT307.U0095);
      MT307.U0096 = new SwiftTagSubItemDefinition("Rate_1", "Rate");
      MT307.U0093.Elements.Add((SwiftDefinitionElement) MT307.U0096);
      MT307.U0091.Elements.Add((SwiftDefinitionElement) MT307.U0093);
      MT307.U008B.Elements.Add((SwiftDefinitionElement) MT307.U0091);
      MT307.U0097 = new SwiftTagSequenceDefinition("SequenceB1", "FX Parties 1");
      MT307.U0098 = new SwiftTagDefinition("StartOfBlock_B1_16R", "Start of Block");
      MT307.U0098.TagName = ":16R:FXPRTY1";
      MT307.U0099 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U0099.Mandatory = false;
      MT307.U0098.Elements.Add((SwiftDefinitionElement) MT307.U0099);
      MT307.U0097.Elements.Add((SwiftDefinitionElement) MT307.U0098);
      MT307.U009A = new SwiftTagChoiceDefinition("Choice", "");
      MT307.U009A.Multiple = true;
      MT307.U009B = new SwiftTagDefinition("Party_B1_95P", "FX Counterparty");
      MT307.U009B.TagName = ":95P::";
      MT307.U009C = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U009B.Elements.Add((SwiftDefinitionElement) MT307.U009C);
      MT307.U009D = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT307.U009B.Elements.Add((SwiftDefinitionElement) MT307.U009D);
      MT307.U009A.Elements.Add((SwiftDefinitionElement) MT307.U009B);
      MT307.U009E = new SwiftTagDefinition("Party_B1_95R", "FX Counterparty");
      MT307.U009E.TagName = ":95R::";
      MT307.U009F = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U009E.Elements.Add((SwiftDefinitionElement) MT307.U009F);
      MT307.U0001U0002 = new SwiftTagSubItemDefinition("DataSourceScheme", "Data Source Scheme");
      MT307.U009E.Elements.Add((SwiftDefinitionElement) MT307.U0001U0002);
      MT307.U0002U0002 = new SwiftTagSubItemDefinition("ProprietaryCode", "Proprietary Code");
      MT307.U009E.Elements.Add((SwiftDefinitionElement) MT307.U0002U0002);
      MT307.U009A.Elements.Add((SwiftDefinitionElement) MT307.U009E);
      MT307.U0003U0002 = new SwiftTagDefinition("Party_B1_95Q", "FX Counterparty");
      MT307.U0003U0002.TagName = ":95Q::";
      MT307.U0004U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0003U0002.Elements.Add((SwiftDefinitionElement) MT307.U0004U0002);
      MT307.U0005U0002 = new SwiftTagSubItemDefinition("NameAndAddress_95Q", "Name & Address");
      MT307.U0003U0002.Elements.Add((SwiftDefinitionElement) MT307.U0005U0002);
      MT307.U009A.Elements.Add((SwiftDefinitionElement) MT307.U0003U0002);
      MT307.U0097.Elements.Add((SwiftDefinitionElement) MT307.U009A);
      MT307.U0006U0002 = new SwiftTagDefinition("EndOfBlock_B1_16S", "End of Block");
      MT307.U0006U0002.TagName = ":16S:FXPRTY1";
      MT307.U0007U0002 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U0007U0002.Mandatory = false;
      MT307.U0006U0002.Elements.Add((SwiftDefinitionElement) MT307.U0007U0002);
      MT307.U0097.Elements.Add((SwiftDefinitionElement) MT307.U0006U0002);
      MT307.U008B.Elements.Add((SwiftDefinitionElement) MT307.U0097);
      MT307.U0008U0002 = new SwiftTagSequenceDefinition("SequenceB2", "FX Parties 2");
      MT307.U000EU0002 = new SwiftTagDefinition("StartOfBlock_B2_16R", "Start of Block");
      MT307.U000EU0002.TagName = ":16R:FXPRTY2";
      MT307.U000FU0002 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U000FU0002.Mandatory = false;
      MT307.U000EU0002.Elements.Add((SwiftDefinitionElement) MT307.U000FU0002);
      MT307.U0008U0002.Elements.Add((SwiftDefinitionElement) MT307.U000EU0002);
      MT307.U0010U0002 = new SwiftTagChoiceDefinition("Choice", "");
      MT307.U0010U0002.Mandatory = false;
      MT307.U0010U0002.Multiple = true;
      MT307.U0011U0002 = new SwiftTagDefinition("Party_B2_95P", "Investor");
      MT307.U0011U0002.TagName = ":95P::";
      MT307.U0012U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0011U0002.Elements.Add((SwiftDefinitionElement) MT307.U0012U0002);
      MT307.U0013U0002 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT307.U0011U0002.Elements.Add((SwiftDefinitionElement) MT307.U0013U0002);
      MT307.U0010U0002.Elements.Add((SwiftDefinitionElement) MT307.U0011U0002);
      MT307.U0014U0002 = new SwiftTagDefinition("Party_B2_95R", "Investor");
      MT307.U0014U0002.TagName = ":95R::";
      MT307.U0015U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0014U0002.Elements.Add((SwiftDefinitionElement) MT307.U0015U0002);
      MT307.U0016U0002 = new SwiftTagSubItemDefinition("DataSourceScheme", "Data Source Scheme");
      MT307.U0014U0002.Elements.Add((SwiftDefinitionElement) MT307.U0016U0002);
      MT307.U0017U0002 = new SwiftTagSubItemDefinition("ProprietaryCode", "Proprietary Code");
      MT307.U0014U0002.Elements.Add((SwiftDefinitionElement) MT307.U0017U0002);
      MT307.U0010U0002.Elements.Add((SwiftDefinitionElement) MT307.U0014U0002);
      MT307.U0018U0002 = new SwiftTagDefinition("Party_B2_95Q", "Investor");
      MT307.U0018U0002.TagName = ":95Q::";
      MT307.U0019U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0018U0002.Elements.Add((SwiftDefinitionElement) MT307.U0019U0002);
      MT307.U001AU0002 = new SwiftTagSubItemDefinition("NameAndAddress_95Q", "Name & Address");
      MT307.U0018U0002.Elements.Add((SwiftDefinitionElement) MT307.U001AU0002);
      MT307.U0010U0002.Elements.Add((SwiftDefinitionElement) MT307.U0018U0002);
      MT307.U0008U0002.Elements.Add((SwiftDefinitionElement) MT307.U0010U0002);
      MT307.U001BU0002 = new SwiftTagDefinition("Account_B2_97A", "Safekeeping Account");
      MT307.U001BU0002.TagName = ":97A::";
      MT307.U001CU0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U001BU0002.Elements.Add((SwiftDefinitionElement) MT307.U001CU0002);
      MT307.U001DU0002 = new SwiftTagSubItemDefinition("AccountNumber", "Account Number");
      MT307.U001BU0002.Elements.Add((SwiftDefinitionElement) MT307.U001DU0002);
      MT307.U0008U0002.Elements.Add((SwiftDefinitionElement) MT307.U001BU0002);
      MT307.U001EU0002 = new SwiftTagDefinition("EndOfBlock_B2_16S", "End of Block");
      MT307.U001EU0002.TagName = ":16S:FXPRTY2";
      MT307.U001FU0002 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U001FU0002.Mandatory = false;
      MT307.U001EU0002.Elements.Add((SwiftDefinitionElement) MT307.U001FU0002);
      MT307.U0008U0002.Elements.Add((SwiftDefinitionElement) MT307.U001EU0002);
      MT307.U008B.Elements.Add((SwiftDefinitionElement) MT307.U0008U0002);
      MT307.U007FU0002 = new SwiftTagSequenceDefinition("SequenceB3", "FX Settlement Details");
      MT307.U007FU0002.Multiple = true;
      MT307.U0080U0002 = new SwiftTagDefinition("StartOfBlock_B3_16R", "Start of Block");
      MT307.U0080U0002.TagName = ":16R:FXSETDET";
      MT307.U0081U0002 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U0081U0002.Mandatory = false;
      MT307.U0080U0002.Elements.Add((SwiftDefinitionElement) MT307.U0081U0002);
      MT307.U007FU0002.Elements.Add((SwiftDefinitionElement) MT307.U0080U0002);
      MT307.U0082U0002 = new SwiftTagDefinition("Amount_B3_19B", "Amount");
      MT307.U0082U0002.TagName = ":19B::";
      MT307.U0083U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0082U0002.Elements.Add((SwiftDefinitionElement) MT307.U0083U0002);
      MT307.U0084U0002 = new SwiftTagSubItemDefinition("CurrencyCodeAndAmount", "Currency Code and Amount");
      MT307.U0086U0002 = new SwiftTagSubItemDefinition("CurrencyCode", "Currency Code");
      MT307.U0084U0002.Elements.Add((SwiftDefinitionElement) MT307.U0086U0002);
      MT307.U0087U0002 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT307.U0084U0002.Elements.Add((SwiftDefinitionElement) MT307.U0087U0002);
      MT307.U0082U0002.Elements.Add((SwiftDefinitionElement) MT307.U0084U0002);
      MT307.U007FU0002.Elements.Add((SwiftDefinitionElement) MT307.U0082U0002);
      MT307.U0088U0002 = new SwiftTagSequenceDefinition("SequenceB3a", "Cash Parties");
      MT307.U0088U0002.Mandatory = false;
      MT307.U0088U0002.Multiple = true;
      MT307.U0089U0002 = new SwiftTagDefinition("StartOfBlock_B3a_16R", "Start of Block");
      MT307.U0089U0002.TagName = ":16R:CSHPRTY";
      MT307.U008AU0002 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U008AU0002.Mandatory = false;
      MT307.U0089U0002.Elements.Add((SwiftDefinitionElement) MT307.U008AU0002);
      MT307.U0088U0002.Elements.Add((SwiftDefinitionElement) MT307.U0089U0002);
      MT307.U008BU0002 = new SwiftTagChoiceDefinition("Choice", "");
      MT307.U008BU0002.Mandatory = false;
      MT307.U008BU0002.Multiple = true;
      MT307.U008CU0002 = new SwiftTagDefinition("Party_B3a_95P", "Party");
      MT307.U008CU0002.TagName = ":95P::";
      MT307.U008DU0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U008CU0002.Elements.Add((SwiftDefinitionElement) MT307.U008DU0002);
      MT307.U008EU0002 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT307.U008CU0002.Elements.Add((SwiftDefinitionElement) MT307.U008EU0002);
      MT307.U008BU0002.Elements.Add((SwiftDefinitionElement) MT307.U008CU0002);
      MT307.U008FU0002 = new SwiftTagDefinition("Party_B3a_95R", "Party");
      MT307.U008FU0002.TagName = ":95R::";
      MT307.U0090U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U008FU0002.Elements.Add((SwiftDefinitionElement) MT307.U0090U0002);
      MT307.U0091U0002 = new SwiftTagSubItemDefinition("DataSourceScheme", "Data Source Scheme");
      MT307.U008FU0002.Elements.Add((SwiftDefinitionElement) MT307.U0091U0002);
      MT307.U0092U0002 = new SwiftTagSubItemDefinition("ProprietaryCode", "Proprietary Code");
      MT307.U008FU0002.Elements.Add((SwiftDefinitionElement) MT307.U0092U0002);
      MT307.U008BU0002.Elements.Add((SwiftDefinitionElement) MT307.U008FU0002);
      MT307.U0093U0002 = new SwiftTagDefinition("Party_B3a_95Q", "Party");
      MT307.U0093U0002.TagName = ":95Q::";
      MT307.U0094U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0093U0002.Elements.Add((SwiftDefinitionElement) MT307.U0094U0002);
      MT307.U0095U0002 = new SwiftTagSubItemDefinition("NameAndAddress_95Q", "Name & Address");
      MT307.U0093U0002.Elements.Add((SwiftDefinitionElement) MT307.U0095U0002);
      MT307.U008BU0002.Elements.Add((SwiftDefinitionElement) MT307.U0093U0002);
      MT307.U0088U0002.Elements.Add((SwiftDefinitionElement) MT307.U008BU0002);
      MT307.U0096U0002 = new SwiftTagDefinition("Account_B3a_97A", "Cash Account");
      MT307.U0096U0002.TagName = ":97A::";
      MT307.U0096U0002.Mandatory = false;
      MT307.U0097U0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0096U0002.Elements.Add((SwiftDefinitionElement) MT307.U0097U0002);
      MT307.U0098U0002 = new SwiftTagSubItemDefinition("AccountNumber", "Account Number");
      MT307.U0096U0002.Elements.Add((SwiftDefinitionElement) MT307.U0098U0002);
      MT307.U0088U0002.Elements.Add((SwiftDefinitionElement) MT307.U0096U0002);
      MT307.U0099U0002 = new SwiftTagDefinition("Narrative_B3a_70C", "Party Contact Narrative");
      MT307.U0099U0002.TagName = ":70C::";
      MT307.U0099U0002.Mandatory = false;
      MT307.U009AU0002 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0099U0002.Elements.Add((SwiftDefinitionElement) MT307.U009AU0002);
      MT307.U009BU0002 = new SwiftTagSubItemDefinition("Narrative", "Narrative");
      MT307.U0099U0002.Elements.Add((SwiftDefinitionElement) MT307.U009BU0002);
      MT307.U0088U0002.Elements.Add((SwiftDefinitionElement) MT307.U0099U0002);
      MT307.U009CU0002 = new SwiftTagDefinition("EndOfBlock_B3a_16S", "End of Block");
      MT307.U009CU0002.TagName = ":16S:CSHPRTY";
      MT307.U009DU0002 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U009DU0002.Mandatory = false;
      MT307.U009CU0002.Elements.Add((SwiftDefinitionElement) MT307.U009DU0002);
      MT307.U0088U0002.Elements.Add((SwiftDefinitionElement) MT307.U009CU0002);
      MT307.U007FU0002.Elements.Add((SwiftDefinitionElement) MT307.U0088U0002);
      MT307.U009EU0002 = new SwiftTagDefinition("EndOfBlock_B3_16S", "End of Block");
      MT307.U009EU0002.TagName = ":16S:FXSETDET";
      MT307.U009FU0002 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U009FU0002.Mandatory = false;
      MT307.U009EU0002.Elements.Add((SwiftDefinitionElement) MT307.U009FU0002);
      MT307.U007FU0002.Elements.Add((SwiftDefinitionElement) MT307.U009EU0002);
      MT307.U008B.Elements.Add((SwiftDefinitionElement) MT307.U007FU0002);
      MT307.U0001U0003 = new SwiftTagDefinition("EndOfBlock_B_16S", "End of Block");
      MT307.U0001U0003.TagName = ":16S:FXDET";
      MT307.U0002U0003 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U0002U0003.Mandatory = false;
      MT307.U0001U0003.Elements.Add((SwiftDefinitionElement) MT307.U0002U0003);
      MT307.U008B.Elements.Add((SwiftDefinitionElement) MT307.U0001U0003);
      MT307.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT307.U008B);
      MT307.U0003U0003 = new SwiftTagSequenceDefinition("SequenceC", "Accounting Information");
      MT307.U0003U0003.Mandatory = false;
      MT307.U0004U0003 = new SwiftTagDefinition("StartOfBlock_C_16R", "Start of Block");
      MT307.U0004U0003.TagName = ":16R:ACCOUNT";
      MT307.U0005U0003 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U0005U0003.Mandatory = false;
      MT307.U0004U0003.Elements.Add((SwiftDefinitionElement) MT307.U0005U0003);
      MT307.U0003U0003.Elements.Add((SwiftDefinitionElement) MT307.U0004U0003);
      MT307.U0006U0003 = new SwiftTagSequenceDefinition("SequenceC1", "Linkages");
      MT307.U0006U0003.Mandatory = false;
      MT307.U0006U0003.Multiple = true;
      MT307.U0007U0003 = new SwiftTagDefinition("StartOfBlock_C1_16R", "Start of Block");
      MT307.U0007U0003.TagName = ":16R:LINK";
      MT307.U0008U0003 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U0008U0003.Mandatory = false;
      MT307.U0007U0003.Elements.Add((SwiftDefinitionElement) MT307.U0008U0003);
      MT307.U0006U0003.Elements.Add((SwiftDefinitionElement) MT307.U0007U0003);
      MT307.U000EU0003 = new SwiftTagChoiceDefinition("Choice", "");
      MT307.U000EU0003.Mandatory = false;
      MT307.U000EU0003.Multiple = true;
      MT307.U000FU0003 = new SwiftTagDefinition("NumberIdentification_C1_13A", "Linked Message");
      MT307.U000FU0003.TagName = ":13A::";
      MT307.U0010U0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U000FU0003.Elements.Add((SwiftDefinitionElement) MT307.U0010U0003);
      MT307.U0011U0003 = new SwiftTagSubItemDefinition("NumberId", "Number Id");
      MT307.U000FU0003.Elements.Add((SwiftDefinitionElement) MT307.U0011U0003);
      MT307.U000EU0003.Elements.Add((SwiftDefinitionElement) MT307.U000FU0003);
      MT307.U0012U0003 = new SwiftTagDefinition("NumberIdentification_C1_13B", "Linked Message");
      MT307.U0012U0003.TagName = ":13B::";
      MT307.U0013U0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0012U0003.Elements.Add((SwiftDefinitionElement) MT307.U0013U0003);
      MT307.U0014U0003 = new SwiftTagSubItemDefinition("DataSource", "Data Source");
      MT307.U0012U0003.Elements.Add((SwiftDefinitionElement) MT307.U0014U0003);
      MT307.U0015U0003 = new SwiftTagSubItemDefinition("Number_13B", "");
      MT307.U0012U0003.Elements.Add((SwiftDefinitionElement) MT307.U0015U0003);
      MT307.U000EU0003.Elements.Add((SwiftDefinitionElement) MT307.U0012U0003);
      MT307.U0006U0003.Elements.Add((SwiftDefinitionElement) MT307.U000EU0003);
      MT307.U0016U0003 = new SwiftTagDefinition("Reference_C1_20C", "Reference to Previous Deals");
      MT307.U0016U0003.TagName = ":20C::";
      MT307.U0017U0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0016U0003.Elements.Add((SwiftDefinitionElement) MT307.U0017U0003);
      MT307.U0018U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT307.U0016U0003.Elements.Add((SwiftDefinitionElement) MT307.U0018U0003);
      MT307.U0006U0003.Elements.Add((SwiftDefinitionElement) MT307.U0016U0003);
      MT307.U0019U0003 = new SwiftTagDefinition("EndOfBlock_C1_16S", "End of Block");
      MT307.U0019U0003.TagName = ":16S:LINK";
      MT307.U001AU0003 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U001AU0003.Mandatory = false;
      MT307.U0019U0003.Elements.Add((SwiftDefinitionElement) MT307.U001AU0003);
      MT307.U0006U0003.Elements.Add((SwiftDefinitionElement) MT307.U0019U0003);
      MT307.U0003U0003.Elements.Add((SwiftDefinitionElement) MT307.U0006U0003);
      MT307.U001BU0003 = new SwiftTagDefinition("Indicator_C_22H", "Gain/Loss Indicator");
      MT307.U001BU0003.TagName = ":22H::";
      MT307.U001CU0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U001BU0003.Elements.Add((SwiftDefinitionElement) MT307.U001CU0003);
      MT307.U001DU0003 = new SwiftTagSubItemDefinition("Indicator", "Indicator");
      MT307.U001BU0003.Elements.Add((SwiftDefinitionElement) MT307.U001DU0003);
      MT307.U0003U0003.Elements.Add((SwiftDefinitionElement) MT307.U001BU0003);
      MT307.U001EU0003 = new SwiftTagDefinition("Amount_C_19B", "Gain/Loss Currency and Amount");
      MT307.U001EU0003.TagName = ":19B::";
      MT307.U001FU0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U001EU0003.Elements.Add((SwiftDefinitionElement) MT307.U001FU0003);
      MT307.U007FU0003 = new SwiftTagSubItemDefinition("CurrencyCodeAndAmount", "Currency Code and Amount");
      MT307.U0080U0003 = new SwiftTagSubItemDefinition("CurrencyCode", "Currency Code");
      MT307.U007FU0003.Elements.Add((SwiftDefinitionElement) MT307.U0080U0003);
      MT307.U0081U0003 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT307.U007FU0003.Elements.Add((SwiftDefinitionElement) MT307.U0081U0003);
      MT307.U001EU0003.Elements.Add((SwiftDefinitionElement) MT307.U007FU0003);
      MT307.U0003U0003.Elements.Add((SwiftDefinitionElement) MT307.U001EU0003);
      MT307.U0082U0003 = new SwiftTagDefinition("EndOfBlock_C_16S", "End of Block");
      MT307.U0082U0003.TagName = ":16S:ACCOUNT";
      MT307.U0083U0003 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U0083U0003.Mandatory = false;
      MT307.U0082U0003.Elements.Add((SwiftDefinitionElement) MT307.U0083U0003);
      MT307.U0003U0003.Elements.Add((SwiftDefinitionElement) MT307.U0082U0003);
      MT307.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT307.U0003U0003);
      MT307.U0084U0003 = new SwiftTagSequenceDefinition("SequenceD", "Net Amount to be Settled");
      MT307.U0084U0003.Mandatory = false;
      MT307.U0086U0003 = new SwiftTagDefinition("StartOfBlock_D_16R", "Start of Block");
      MT307.U0086U0003.TagName = ":16R:NET";
      MT307.U0087U0003 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U0087U0003.Mandatory = false;
      MT307.U0086U0003.Elements.Add((SwiftDefinitionElement) MT307.U0087U0003);
      MT307.U0084U0003.Elements.Add((SwiftDefinitionElement) MT307.U0086U0003);
      MT307.U0088U0003 = new SwiftTagDefinition("Indicator_D_22H", "Gain/Loss Indicator");
      MT307.U0088U0003.TagName = ":22H::";
      MT307.U0089U0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0088U0003.Elements.Add((SwiftDefinitionElement) MT307.U0089U0003);
      MT307.U008AU0003 = new SwiftTagSubItemDefinition("Indicator", "Indicator");
      MT307.U0088U0003.Elements.Add((SwiftDefinitionElement) MT307.U008AU0003);
      MT307.U0084U0003.Elements.Add((SwiftDefinitionElement) MT307.U0088U0003);
      MT307.U008BU0003 = new SwiftTagDefinition("Amount_D_19B", "Net Gain/Loss Amount");
      MT307.U008BU0003.TagName = ":19B::";
      MT307.U008CU0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U008BU0003.Elements.Add((SwiftDefinitionElement) MT307.U008CU0003);
      MT307.U008DU0003 = new SwiftTagSubItemDefinition("CurrencyCodeAndAmount", "Currency Code and Amount");
      MT307.U008EU0003 = new SwiftTagSubItemDefinition("CurrencyCode", "Currency Code");
      MT307.U008DU0003.Elements.Add((SwiftDefinitionElement) MT307.U008EU0003);
      MT307.U008FU0003 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT307.U008DU0003.Elements.Add((SwiftDefinitionElement) MT307.U008FU0003);
      MT307.U008BU0003.Elements.Add((SwiftDefinitionElement) MT307.U008DU0003);
      MT307.U0084U0003.Elements.Add((SwiftDefinitionElement) MT307.U008BU0003);
      MT307.U0090U0003 = new SwiftTagSequenceDefinition("SequenceD1", "Cash Parties");
      MT307.U0090U0003.Mandatory = false;
      MT307.U0090U0003.Multiple = true;
      MT307.U0091U0003 = new SwiftTagDefinition("StartOfBlock_D1_16R", "Start of Block");
      MT307.U0091U0003.TagName = ":16R:CSHPRTY";
      MT307.U0092U0003 = new SwiftTagSubItemDefinition("StartOfBlock", "Start of Block ");
      MT307.U0092U0003.Mandatory = false;
      MT307.U0091U0003.Elements.Add((SwiftDefinitionElement) MT307.U0092U0003);
      MT307.U0090U0003.Elements.Add((SwiftDefinitionElement) MT307.U0091U0003);
      MT307.U0093U0003 = new SwiftTagChoiceDefinition("Choice", "");
      MT307.U0093U0003.Multiple = true;
      MT307.U0094U0003 = new SwiftTagDefinition("Party_D1_95P", "Party");
      MT307.U0094U0003.TagName = ":95P::";
      MT307.U0095U0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0094U0003.Elements.Add((SwiftDefinitionElement) MT307.U0095U0003);
      MT307.U0096U0003 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT307.U0094U0003.Elements.Add((SwiftDefinitionElement) MT307.U0096U0003);
      MT307.U0093U0003.Elements.Add((SwiftDefinitionElement) MT307.U0094U0003);
      MT307.U0097U0003 = new SwiftTagDefinition("Party_D1_95R", "Party");
      MT307.U0097U0003.TagName = ":95R::";
      MT307.U0098U0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0097U0003.Elements.Add((SwiftDefinitionElement) MT307.U0098U0003);
      MT307.U0099U0003 = new SwiftTagSubItemDefinition("DataSourceScheme", "Data Source Scheme");
      MT307.U0097U0003.Elements.Add((SwiftDefinitionElement) MT307.U0099U0003);
      MT307.U009AU0003 = new SwiftTagSubItemDefinition("ProprietaryCode", "Proprietary Code");
      MT307.U0097U0003.Elements.Add((SwiftDefinitionElement) MT307.U009AU0003);
      MT307.U0093U0003.Elements.Add((SwiftDefinitionElement) MT307.U0097U0003);
      MT307.U009BU0003 = new SwiftTagDefinition("Party_D1_95Q", "Party");
      MT307.U009BU0003.TagName = ":95Q::";
      MT307.U009CU0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U009BU0003.Elements.Add((SwiftDefinitionElement) MT307.U009CU0003);
      MT307.U009DU0003 = new SwiftTagSubItemDefinition("NameAndAddress_95Q", "Name & Address");
      MT307.U009BU0003.Elements.Add((SwiftDefinitionElement) MT307.U009DU0003);
      MT307.U0093U0003.Elements.Add((SwiftDefinitionElement) MT307.U009BU0003);
      MT307.U0090U0003.Elements.Add((SwiftDefinitionElement) MT307.U0093U0003);
      MT307.U009EU0003 = new SwiftTagDefinition("Account_D1_97A", "Cash Account");
      MT307.U009EU0003.TagName = ":97A::";
      MT307.U009EU0003.Mandatory = false;
      MT307.U009FU0003 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U009EU0003.Elements.Add((SwiftDefinitionElement) MT307.U009FU0003);
      MT307.U0001U0004 = new SwiftTagSubItemDefinition("AccountNumber", "Account Number");
      MT307.U009EU0003.Elements.Add((SwiftDefinitionElement) MT307.U0001U0004);
      MT307.U0090U0003.Elements.Add((SwiftDefinitionElement) MT307.U009EU0003);
      MT307.U0002U0004 = new SwiftTagDefinition("Narrative_D1_70C", "Party Contact Narrative");
      MT307.U0002U0004.TagName = ":70C::";
      MT307.U0002U0004.Mandatory = false;
      MT307.U0003U0004 = new SwiftTagSubItemDefinition("Qualifier", "Qualifier");
      MT307.U0002U0004.Elements.Add((SwiftDefinitionElement) MT307.U0003U0004);
      MT307.U0004U0004 = new SwiftTagSubItemDefinition("Narrative", "Narrative");
      MT307.U0002U0004.Elements.Add((SwiftDefinitionElement) MT307.U0004U0004);
      MT307.U0090U0003.Elements.Add((SwiftDefinitionElement) MT307.U0002U0004);
      MT307.U0005U0004 = new SwiftTagDefinition("EndOfBlock_D1_16S", "End of Block");
      MT307.U0005U0004.TagName = ":16S:CSHPRTY";
      MT307.U0006U0004 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U0006U0004.Mandatory = false;
      MT307.U0005U0004.Elements.Add((SwiftDefinitionElement) MT307.U0006U0004);
      MT307.U0090U0003.Elements.Add((SwiftDefinitionElement) MT307.U0005U0004);
      MT307.U0084U0003.Elements.Add((SwiftDefinitionElement) MT307.U0090U0003);
      MT307.U0007U0004 = new SwiftTagDefinition("EndOfBlock_D_16S", "End of Block");
      MT307.U0007U0004.TagName = ":16S:NET";
      MT307.U0008U0004 = new SwiftTagSubItemDefinition("EndOfBlock", "End of Block");
      MT307.U0008U0004.Mandatory = false;
      MT307.U0007U0004.Elements.Add((SwiftDefinitionElement) MT307.U0008U0004);
      MT307.U0084U0003.Elements.Add((SwiftDefinitionElement) MT307.U0007U0004);
      MT307.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT307.U0084U0003);
    }

    public class SequenceAClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT307.U0002;
        }
      }

      [Description("Start of Block")]
      public Tag16R StartOfBlock_A_16R
      {
        get
        {
          return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0003);
        }
      }

      [Description("Start of Block")]
      public Tag16R Tag16R_StartOfBlock_A
      {
        get
        {
          return this.StartOfBlock_A_16R;
        }
      }

      [Description("Reference")]
      public Tag20C[] Reference_A_20C
      {
        get
        {
          int index = -1;
          List<Tag20C> list = new List<Tag20C>();
          int count;
          do
          {
            ++index;
            Tag20C tag20C = new Tag20C((SwiftElement) this, index, (SwiftDefinitionElement) MT307.U0005);
            count = this.ListTags((SwiftElement) tag20C).Count;
            if (count > 0)
              list.Add(tag20C);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("Reference")]
      public Tag20C[] Tag20C_Reference_A
      {
        get
        {
          return this.Reference_A_20C;
        }
      }

      [Description("Function of the Message")]
      public Tag23G FunctionOfTheMessage_A_23G
      {
        get
        {
          return new Tag23G((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0008);
        }
      }

      [Description("Function of the Message")]
      public Tag23G Tag23G_FunctionOfTheMessage_A
      {
        get
        {
          return this.FunctionOfTheMessage_A_23G;
        }
      }

      [Description("Indicator")]
      public MT307.SequenceAClass.Tag22H[] Indicator_A_22H
      {
        get
        {
          int index = -1;
          List<MT307.SequenceAClass.Tag22H> list = new List<MT307.SequenceAClass.Tag22H>();
          int count;
          do
          {
            ++index;
            MT307.SequenceAClass.Tag22H tag22H = new MT307.SequenceAClass.Tag22H((SwiftElement) this, index, (SwiftDefinitionElement) MT307.U0012);
            count = this.ListTags((SwiftElement) tag22H).Count;
            if (count > 0)
              list.Add(tag22H);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("Indicator")]
      public MT307.SequenceAClass.Tag22H[] Tag22H_Indicator_A
      {
        get
        {
          return this.Indicator_A_22H;
        }
      }

      [Description("Indicator")]
      public Tag22F[] Indicator_A_22F
      {
        get
        {
          int index = -1;
          List<Tag22F> list = new List<Tag22F>();
          int count;
          do
          {
            ++index;
            Tag22F tag22F = new Tag22F((SwiftElement) this, index, (SwiftDefinitionElement) MT307.U0015);
            count = this.ListTags((SwiftElement) tag22F).Count;
            if (count > 0)
              list.Add(tag22F);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("Indicator")]
      public Tag22F[] Tag22F_Indicator_A
      {
        get
        {
          return this.Indicator_A_22F;
        }
      }

      [Description("Linkages")]
      public MT307.SequenceAClass.SequenceA1Class[] SequenceA1
      {
        get
        {
          int index = -1;
          List<MT307.SequenceAClass.SequenceA1Class> list = new List<MT307.SequenceAClass.SequenceA1Class>();
          int count;
          do
          {
            ++index;
            MT307.SequenceAClass.SequenceA1Class sequenceA1Class = new MT307.SequenceAClass.SequenceA1Class((SwiftElement) this, index, false);
            count = this.ListTags((SwiftElement) sequenceA1Class).Count;
            if (count > 0)
              list.Add(sequenceA1Class);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("End of Block")]
      public Tag16S EndOfBlock_A_16S
      {
        get
        {
          return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0089);
        }
      }

      [Description("End of Block")]
      public Tag16S Tag16S_EndOfBlock_A
      {
        get
        {
          return this.EndOfBlock_A_16S;
        }
      }

      internal SequenceAClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public Tag20C AddReference_A_20C()
      {
        return new Tag20C((SwiftElement) this, this.Reference_A_20C.Length, (SwiftDefinitionElement) MT307.U0005)
        {
          Value = string.Empty
        };
      }

      public void RemoveReference_A_20C(Tag20C tag)
      {
        this.RemoveTag(tag.GetTag());
      }

      public MT307.SequenceAClass.Tag22H AddIndicator_A_22H()
      {
        return new MT307.SequenceAClass.Tag22H((SwiftElement) this, this.Indicator_A_22H.Length, (SwiftDefinitionElement) MT307.U0012)
        {
          Value = string.Empty
        };
      }

      public void RemoveIndicator_A_22H(MT307.SequenceAClass.Tag22H tag)
      {
        this.RemoveTag(tag.GetTag());
      }

      public Tag22F AddIndicator_A_22F()
      {
        return new Tag22F((SwiftElement) this, this.Indicator_A_22F.Length, (SwiftDefinitionElement) MT307.U0015)
        {
          Value = string.Empty
        };
      }

      public void RemoveIndicator_A_22F(Tag22F tag)
      {
        this.RemoveTag(tag.GetTag());
      }

      public MT307.SequenceAClass.SequenceA1Class AddSequenceA1()
      {
        return new MT307.SequenceAClass.SequenceA1Class((SwiftElement) this, this.SequenceA1.Length, true);
      }

      public void RemoveSequenceA1(MT307.SequenceAClass.SequenceA1Class sequence)
      {
        foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
          this.RemoveTag(tag);
      }

      public class Tag22H : SwiftTagWrapper
      {
        public string Value
        {
          get
          {
            return this.GetValue();
          }
          set
          {
            this.SetValue("22H", value);
          }
        }

        internal Tag22H(SwiftElement parent, int index, SwiftDefinitionElement definition)
          : base(parent, index, definition)
        {
        }
      }

      public class SequenceA1Class : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT307.U0019;
          }
        }

        [Description("Start of Block")]
        public Tag16R StartOfBlock_A1_16R
        {
          get
          {
            return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U001A);
          }
        }

        [Description("Start of Block")]
        public Tag16R Tag16R_StartOfBlock_A1
        {
          get
          {
            return this.StartOfBlock_A1_16R;
          }
        }

        [Description("Linked Transaction")]
        public Tag13A NumberIdentification_A1_13A
        {
          get
          {
            return new Tag13A((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U001D);
          }
        }

        [Description("Linked Transaction")]
        public Tag13A Tag13A_NumberIdentification_A1
        {
          get
          {
            return this.NumberIdentification_A1_13A;
          }
        }

        [Description("Agreement Version Number")]
        public Tag13B NumberIdentification_A1_13B
        {
          get
          {
            return new Tag13B((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U007F);
          }
        }

        [Description("Agreement Version Number")]
        public Tag13B Tag13B_NumberIdentification_A1
        {
          get
          {
            return this.NumberIdentification_A1_13B;
          }
        }

        [Description("Reference")]
        public Tag20C Reference_A1_20C
        {
          get
          {
            return new Tag20C((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0083);
          }
        }

        [Description("Reference")]
        public Tag20C Tag20C_Reference_A1
        {
          get
          {
            return this.Reference_A1_20C;
          }
        }

        [Description("End of Block")]
        public Tag16S EndOfBlock_A1_16S
        {
          get
          {
            return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0087);
          }
        }

        [Description("End of Block")]
        public Tag16S Tag16S_EndOfBlock_A1
        {
          get
          {
            return this.EndOfBlock_A1_16S;
          }
        }

        internal SequenceA1Class(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }
      }
    }

    public class SequenceBClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT307.U008B;
        }
      }

      [Description("Start of Block")]
      public Tag16R StartOfBlock_B_16R
      {
        get
        {
          return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U008C);
        }
      }

      [Description("Start of Block")]
      public Tag16R Tag16R_StartOfBlock_B
      {
        get
        {
          return this.StartOfBlock_B_16R;
        }
      }

      [Description("Date")]
      public Tag98A[] Date_B_98A
      {
        get
        {
          int index = -1;
          List<Tag98A> list = new List<Tag98A>();
          int count;
          do
          {
            ++index;
            Tag98A tag98A = new Tag98A((SwiftElement) this, index, (SwiftDefinitionElement) MT307.U008E);
            count = this.ListTags((SwiftElement) tag98A).Count;
            if (count > 0)
              list.Add(tag98A);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("Date")]
      public Tag98A[] Tag98A_Date_B
      {
        get
        {
          return this.Date_B_98A;
        }
      }

      [Description("Exchange Rate")]
      public MT307.SequenceBClass.Tag92B Rate_B_92B
      {
        get
        {
          return new MT307.SequenceBClass.Tag92B((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0091);
        }
      }

      [Description("Exchange Rate")]
      public MT307.SequenceBClass.Tag92B Tag92B_Rate_B
      {
        get
        {
          return this.Rate_B_92B;
        }
      }

      [Description("FX Parties 1")]
      public MT307.SequenceBClass.SequenceB1Class SequenceB1
      {
        get
        {
          return new MT307.SequenceBClass.SequenceB1Class((SwiftElement) this, 0, false);
        }
      }

      [Description("FX Parties 2")]
      public MT307.SequenceBClass.SequenceB2Class SequenceB2
      {
        get
        {
          return new MT307.SequenceBClass.SequenceB2Class((SwiftElement) this, 0, false);
        }
      }

      [Description("FX Settlement Details")]
      public MT307.SequenceBClass.SequenceB3Class[] SequenceB3
      {
        get
        {
          int index = -1;
          List<MT307.SequenceBClass.SequenceB3Class> list = new List<MT307.SequenceBClass.SequenceB3Class>();
          int count;
          do
          {
            ++index;
            MT307.SequenceBClass.SequenceB3Class sequenceB3Class = new MT307.SequenceBClass.SequenceB3Class((SwiftElement) this, index, false);
            count = this.ListTags((SwiftElement) sequenceB3Class).Count;
            if (count > 0)
              list.Add(sequenceB3Class);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("End of Block")]
      public Tag16S EndOfBlock_B_16S
      {
        get
        {
          return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0001U0003);
        }
      }

      [Description("End of Block")]
      public Tag16S Tag16S_EndOfBlock_B
      {
        get
        {
          return this.EndOfBlock_B_16S;
        }
      }

      internal SequenceBClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public Tag98A AddDate_B_98A()
      {
        return new Tag98A((SwiftElement) this, this.Date_B_98A.Length, (SwiftDefinitionElement) MT307.U008E)
        {
          Value = string.Empty
        };
      }

      public void RemoveDate_B_98A(Tag98A tag)
      {
        this.RemoveTag(tag.GetTag());
      }

      public MT307.SequenceBClass.SequenceB3Class AddSequenceB3()
      {
        return new MT307.SequenceBClass.SequenceB3Class((SwiftElement) this, this.SequenceB3.Length, true);
      }

      public void RemoveSequenceB3(MT307.SequenceBClass.SequenceB3Class sequence)
      {
        foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
          this.RemoveTag(tag);
      }

      public class Tag92B : SwiftTagWrapper
      {
        public string Value
        {
          get
          {
            return this.GetValue();
          }
          set
          {
            this.SetValue("92B", value);
          }
        }

        internal Tag92B(SwiftElement parent, int index, SwiftDefinitionElement definition)
          : base(parent, index, definition)
        {
        }
      }

      public class SequenceB1Class : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT307.U0097;
          }
        }

        [Description("Start of Block")]
        public Tag16R StartOfBlock_B1_16R
        {
          get
          {
            return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0098);
          }
        }

        [Description("Start of Block")]
        public Tag16R Tag16R_StartOfBlock_B1
        {
          get
          {
            return this.StartOfBlock_B1_16R;
          }
        }

        [Description("FX Counterparty")]
        public Tag95P Party_B1_95P
        {
          get
          {
            return new Tag95P((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U009B);
          }
        }

        [Description("FX Counterparty")]
        public Tag95P Tag95P_Party_B1
        {
          get
          {
            return this.Party_B1_95P;
          }
        }

        [Description("FX Counterparty")]
        public Tag95R Party_B1_95R
        {
          get
          {
            return new Tag95R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U009E);
          }
        }

        [Description("FX Counterparty")]
        public Tag95R Tag95R_Party_B1
        {
          get
          {
            return this.Party_B1_95R;
          }
        }

        [Description("FX Counterparty")]
        public Tag95Q Party_B1_95Q
        {
          get
          {
            return new Tag95Q((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0003U0002);
          }
        }

        [Description("FX Counterparty")]
        public Tag95Q Tag95Q_Party_B1
        {
          get
          {
            return this.Party_B1_95Q;
          }
        }

        [Description("End of Block")]
        public Tag16S EndOfBlock_B1_16S
        {
          get
          {
            return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0006U0002);
          }
        }

        [Description("End of Block")]
        public Tag16S Tag16S_EndOfBlock_B1
        {
          get
          {
            return this.EndOfBlock_B1_16S;
          }
        }

        internal SequenceB1Class(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }
      }

      public class SequenceB2Class : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT307.U0008U0002;
          }
        }

        [Description("Start of Block")]
        public Tag16R StartOfBlock_B2_16R
        {
          get
          {
            return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U000EU0002);
          }
        }

        [Description("Start of Block")]
        public Tag16R Tag16R_StartOfBlock_B2
        {
          get
          {
            return this.StartOfBlock_B2_16R;
          }
        }

        [Description("Investor")]
        public Tag95P Party_B2_95P
        {
          get
          {
            return new Tag95P((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0011U0002);
          }
        }

        [Description("Investor")]
        public Tag95P Tag95P_Party_B2
        {
          get
          {
            return this.Party_B2_95P;
          }
        }

        [Description("Investor")]
        public Tag95R Party_B2_95R
        {
          get
          {
            return new Tag95R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0014U0002);
          }
        }

        [Description("Investor")]
        public Tag95R Tag95R_Party_B2
        {
          get
          {
            return this.Party_B2_95R;
          }
        }

        [Description("Investor")]
        public Tag95Q Party_B2_95Q
        {
          get
          {
            return new Tag95Q((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0018U0002);
          }
        }

        [Description("Investor")]
        public Tag95Q Tag95Q_Party_B2
        {
          get
          {
            return this.Party_B2_95Q;
          }
        }

        [Description("Safekeeping Account")]
        public Tag97A Account_B2_97A
        {
          get
          {
            return new Tag97A((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U001BU0002);
          }
        }

        [Description("Safekeeping Account")]
        public Tag97A Tag97A_Account_B2
        {
          get
          {
            return this.Account_B2_97A;
          }
        }

        [Description("End of Block")]
        public Tag16S EndOfBlock_B2_16S
        {
          get
          {
            return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U001EU0002);
          }
        }

        [Description("End of Block")]
        public Tag16S Tag16S_EndOfBlock_B2
        {
          get
          {
            return this.EndOfBlock_B2_16S;
          }
        }

        internal SequenceB2Class(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }
      }

      public class SequenceB3Class : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT307.U007FU0002;
          }
        }

        [Description("Start of Block")]
        public Tag16R StartOfBlock_B3_16R
        {
          get
          {
            return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0080U0002);
          }
        }

        [Description("Start of Block")]
        public Tag16R Tag16R_StartOfBlock_B3
        {
          get
          {
            return this.StartOfBlock_B3_16R;
          }
        }

        [Description("Amount")]
        public Tag19B Amount_B3_19B
        {
          get
          {
            return new Tag19B((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0082U0002);
          }
        }

        [Description("Amount")]
        public Tag19B Tag19B_Amount_B3
        {
          get
          {
            return this.Amount_B3_19B;
          }
        }

        [Description("Cash Parties")]
        public MT307.SequenceBClass.SequenceB3Class.SequenceB3aClass[] SequenceB3a
        {
          get
          {
            int index = -1;
            List<MT307.SequenceBClass.SequenceB3Class.SequenceB3aClass> list = new List<MT307.SequenceBClass.SequenceB3Class.SequenceB3aClass>();
            int count;
            do
            {
              ++index;
              MT307.SequenceBClass.SequenceB3Class.SequenceB3aClass sequenceB3aClass = new MT307.SequenceBClass.SequenceB3Class.SequenceB3aClass((SwiftElement) this, index, false);
              count = this.ListTags((SwiftElement) sequenceB3aClass).Count;
              if (count > 0)
                list.Add(sequenceB3aClass);
            }
            while (count > 0);
            return list.ToArray();
          }
        }

        [Description("End of Block")]
        public Tag16S EndOfBlock_B3_16S
        {
          get
          {
            return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U009EU0002);
          }
        }

        [Description("End of Block")]
        public Tag16S Tag16S_EndOfBlock_B3
        {
          get
          {
            return this.EndOfBlock_B3_16S;
          }
        }

        internal SequenceB3Class(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }

        public MT307.SequenceBClass.SequenceB3Class.SequenceB3aClass AddSequenceB3a()
        {
          return new MT307.SequenceBClass.SequenceB3Class.SequenceB3aClass((SwiftElement) this, this.SequenceB3a.Length, true);
        }

        public void RemoveSequenceB3a(MT307.SequenceBClass.SequenceB3Class.SequenceB3aClass sequence)
        {
          foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
            this.RemoveTag(tag);
        }

        public class SequenceB3aClass : SwiftTagSequence
        {
          internal override SwiftDefinitionElement Definition
          {
            get
            {
              return (SwiftDefinitionElement) MT307.U0088U0002;
            }
          }

          [Description("Start of Block")]
          public Tag16R StartOfBlock_B3a_16R
          {
            get
            {
              return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0089U0002);
            }
          }

          [Description("Start of Block")]
          public Tag16R Tag16R_StartOfBlock_B3a
          {
            get
            {
              return this.StartOfBlock_B3a_16R;
            }
          }

          [Description("Party")]
          public Tag95P Party_B3a_95P
          {
            get
            {
              return new Tag95P((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U008CU0002);
            }
          }

          [Description("Party")]
          public Tag95P Tag95P_Party_B3a
          {
            get
            {
              return this.Party_B3a_95P;
            }
          }

          [Description("Party")]
          public Tag95R Party_B3a_95R
          {
            get
            {
              return new Tag95R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U008FU0002);
            }
          }

          [Description("Party")]
          public Tag95R Tag95R_Party_B3a
          {
            get
            {
              return this.Party_B3a_95R;
            }
          }

          [Description("Party")]
          public Tag95Q Party_B3a_95Q
          {
            get
            {
              return new Tag95Q((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0093U0002);
            }
          }

          [Description("Party")]
          public Tag95Q Tag95Q_Party_B3a
          {
            get
            {
              return this.Party_B3a_95Q;
            }
          }

          [Description("Cash Account")]
          public Tag97A Account_B3a_97A
          {
            get
            {
              return new Tag97A((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0096U0002);
            }
          }

          [Description("Cash Account")]
          public Tag97A Tag97A_Account_B3a
          {
            get
            {
              return this.Account_B3a_97A;
            }
          }

          [Description("Party Contact Narrative")]
          public Tag70C Narrative_B3a_70C
          {
            get
            {
              return new Tag70C((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0099U0002);
            }
          }

          [Description("Party Contact Narrative")]
          public Tag70C Tag70C_Narrative_B3a
          {
            get
            {
              return this.Narrative_B3a_70C;
            }
          }

          [Description("End of Block")]
          public Tag16S EndOfBlock_B3a_16S
          {
            get
            {
              return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U009CU0002);
            }
          }

          [Description("End of Block")]
          public Tag16S Tag16S_EndOfBlock_B3a
          {
            get
            {
              return this.EndOfBlock_B3a_16S;
            }
          }

          internal SequenceB3aClass(SwiftElement parent, int index, bool createTags)
            : base(parent, index, createTags)
          {
          }
        }
      }
    }

    public class SequenceCClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT307.U0003U0003;
        }
      }

      [Description("Start of Block")]
      public Tag16R StartOfBlock_C_16R
      {
        get
        {
          return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0004U0003);
        }
      }

      [Description("Start of Block")]
      public Tag16R Tag16R_StartOfBlock_C
      {
        get
        {
          return this.StartOfBlock_C_16R;
        }
      }

      [Description("Linkages")]
      public MT307.SequenceCClass.SequenceC1Class[] SequenceC1
      {
        get
        {
          int index = -1;
          List<MT307.SequenceCClass.SequenceC1Class> list = new List<MT307.SequenceCClass.SequenceC1Class>();
          int count;
          do
          {
            ++index;
            MT307.SequenceCClass.SequenceC1Class sequenceC1Class = new MT307.SequenceCClass.SequenceC1Class((SwiftElement) this, index, false);
            count = this.ListTags((SwiftElement) sequenceC1Class).Count;
            if (count > 0)
              list.Add(sequenceC1Class);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("Gain/Loss Indicator")]
      public Tag22H Indicator_C_22H
      {
        get
        {
          return new Tag22H((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U001BU0003);
        }
      }

      [Description("Gain/Loss Indicator")]
      public Tag22H Tag22H_Indicator_C
      {
        get
        {
          return this.Indicator_C_22H;
        }
      }

      [Description("Gain/Loss Currency and Amount")]
      public Tag19B Amount_C_19B
      {
        get
        {
          return new Tag19B((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U001EU0003);
        }
      }

      [Description("Gain/Loss Currency and Amount")]
      public Tag19B Tag19B_Amount_C
      {
        get
        {
          return this.Amount_C_19B;
        }
      }

      [Description("End of Block")]
      public Tag16S EndOfBlock_C_16S
      {
        get
        {
          return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0082U0003);
        }
      }

      [Description("End of Block")]
      public Tag16S Tag16S_EndOfBlock_C
      {
        get
        {
          return this.EndOfBlock_C_16S;
        }
      }

      internal SequenceCClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public MT307.SequenceCClass.SequenceC1Class AddSequenceC1()
      {
        return new MT307.SequenceCClass.SequenceC1Class((SwiftElement) this, this.SequenceC1.Length, true);
      }

      public void RemoveSequenceC1(MT307.SequenceCClass.SequenceC1Class sequence)
      {
        foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
          this.RemoveTag(tag);
      }

      public class SequenceC1Class : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT307.U0006U0003;
          }
        }

        [Description("Start of Block")]
        public Tag16R StartOfBlock_C1_16R
        {
          get
          {
            return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0007U0003);
          }
        }

        [Description("Start of Block")]
        public Tag16R Tag16R_StartOfBlock_C1
        {
          get
          {
            return this.StartOfBlock_C1_16R;
          }
        }

        [Description("Linked Message")]
        public Tag13A NumberIdentification_C1_13A
        {
          get
          {
            return new Tag13A((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U000FU0003);
          }
        }

        [Description("Linked Message")]
        public Tag13A Tag13A_NumberIdentification_C1
        {
          get
          {
            return this.NumberIdentification_C1_13A;
          }
        }

        [Description("Linked Message")]
        public Tag13B NumberIdentification_C1_13B
        {
          get
          {
            return new Tag13B((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0012U0003);
          }
        }

        [Description("Linked Message")]
        public Tag13B Tag13B_NumberIdentification_C1
        {
          get
          {
            return this.NumberIdentification_C1_13B;
          }
        }

        [Description("Reference to Previous Deals")]
        public Tag20C Reference_C1_20C
        {
          get
          {
            return new Tag20C((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0016U0003);
          }
        }

        [Description("Reference to Previous Deals")]
        public Tag20C Tag20C_Reference_C1
        {
          get
          {
            return this.Reference_C1_20C;
          }
        }

        [Description("End of Block")]
        public Tag16S EndOfBlock_C1_16S
        {
          get
          {
            return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0019U0003);
          }
        }

        [Description("End of Block")]
        public Tag16S Tag16S_EndOfBlock_C1
        {
          get
          {
            return this.EndOfBlock_C1_16S;
          }
        }

        internal SequenceC1Class(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }
      }
    }

    public class SequenceDClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT307.U0084U0003;
        }
      }

      [Description("Start of Block")]
      public Tag16R StartOfBlock_D_16R
      {
        get
        {
          return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0086U0003);
        }
      }

      [Description("Start of Block")]
      public Tag16R Tag16R_StartOfBlock_D
      {
        get
        {
          return this.StartOfBlock_D_16R;
        }
      }

      [Description("Gain/Loss Indicator")]
      public Tag22H Indicator_D_22H
      {
        get
        {
          return new Tag22H((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0088U0003);
        }
      }

      [Description("Gain/Loss Indicator")]
      public Tag22H Tag22H_Indicator_D
      {
        get
        {
          return this.Indicator_D_22H;
        }
      }

      [Description("Net Gain/Loss Amount")]
      public Tag19B Amount_D_19B
      {
        get
        {
          return new Tag19B((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U008BU0003);
        }
      }

      [Description("Net Gain/Loss Amount")]
      public Tag19B Tag19B_Amount_D
      {
        get
        {
          return this.Amount_D_19B;
        }
      }

      [Description("Cash Parties")]
      public MT307.SequenceDClass.SequenceD1Class[] SequenceD1
      {
        get
        {
          int index = -1;
          List<MT307.SequenceDClass.SequenceD1Class> list = new List<MT307.SequenceDClass.SequenceD1Class>();
          int count;
          do
          {
            ++index;
            MT307.SequenceDClass.SequenceD1Class sequenceD1Class = new MT307.SequenceDClass.SequenceD1Class((SwiftElement) this, index, false);
            count = this.ListTags((SwiftElement) sequenceD1Class).Count;
            if (count > 0)
              list.Add(sequenceD1Class);
          }
          while (count > 0);
          return list.ToArray();
        }
      }

      [Description("End of Block")]
      public Tag16S EndOfBlock_D_16S
      {
        get
        {
          return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0007U0004);
        }
      }

      [Description("End of Block")]
      public Tag16S Tag16S_EndOfBlock_D
      {
        get
        {
          return this.EndOfBlock_D_16S;
        }
      }

      internal SequenceDClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public MT307.SequenceDClass.SequenceD1Class AddSequenceD1()
      {
        return new MT307.SequenceDClass.SequenceD1Class((SwiftElement) this, this.SequenceD1.Length, true);
      }

      public void RemoveSequenceD1(MT307.SequenceDClass.SequenceD1Class sequence)
      {
        foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
          this.RemoveTag(tag);
      }

      public class SequenceD1Class : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT307.U0090U0003;
          }
        }

        [Description("Start of Block")]
        public Tag16R StartOfBlock_D1_16R
        {
          get
          {
            return new Tag16R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0091U0003);
          }
        }

        [Description("Start of Block")]
        public Tag16R Tag16R_StartOfBlock_D1
        {
          get
          {
            return this.StartOfBlock_D1_16R;
          }
        }

        [Description("Party")]
        public Tag95P Party_D1_95P
        {
          get
          {
            return new Tag95P((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0094U0003);
          }
        }

        [Description("Party")]
        public Tag95P Tag95P_Party_D1
        {
          get
          {
            return this.Party_D1_95P;
          }
        }

        [Description("Party")]
        public Tag95R Party_D1_95R
        {
          get
          {
            return new Tag95R((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0097U0003);
          }
        }

        [Description("Party")]
        public Tag95R Tag95R_Party_D1
        {
          get
          {
            return this.Party_D1_95R;
          }
        }

        [Description("Party")]
        public Tag95Q Party_D1_95Q
        {
          get
          {
            return new Tag95Q((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U009BU0003);
          }
        }

        [Description("Party")]
        public Tag95Q Tag95Q_Party_D1
        {
          get
          {
            return this.Party_D1_95Q;
          }
        }

        [Description("Cash Account")]
        public Tag97A Account_D1_97A
        {
          get
          {
            return new Tag97A((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U009EU0003);
          }
        }

        [Description("Cash Account")]
        public Tag97A Tag97A_Account_D1
        {
          get
          {
            return this.Account_D1_97A;
          }
        }

        [Description("Party Contact Narrative")]
        public Tag70C Narrative_D1_70C
        {
          get
          {
            return new Tag70C((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0002U0004);
          }
        }

        [Description("Party Contact Narrative")]
        public Tag70C Tag70C_Narrative_D1
        {
          get
          {
            return this.Narrative_D1_70C;
          }
        }

        [Description("End of Block")]
        public Tag16S EndOfBlock_D1_16S
        {
          get
          {
            return new Tag16S((SwiftElement) this, 0, (SwiftDefinitionElement) MT307.U0005U0004);
          }
        }

        [Description("End of Block")]
        public Tag16S Tag16S_EndOfBlock_D1
        {
          get
          {
            return this.EndOfBlock_D1_16S;
          }
        }

        internal SequenceD1Class(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }
      }
    }
  }
}
